package com.whfc.ms.api.fse.service.impl;

import com.whfc.common.result.ListData;
import com.whfc.common.result.PageData;
import com.whfc.fse.dto.FseGantryDTO;
import com.whfc.fse.dto.FseGantryDataDTO;
import com.whfc.fse.dto.FseGantryDataLogDTO;
import com.whfc.fse.param.FseGantryAddParam;
import com.whfc.fse.param.FseGantryBindParam;
import com.whfc.fse.param.FseGantryEditParam;
import com.whfc.fse.param.FseGantryUnbindParam;
import com.whfc.fse.service.FseGantryService;
import com.whfc.ms.api.fse.service.MsFseGantryService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * @Description 龙门吊服务类
 * @Author hw
 * @Date 2021-06-01 17:53
 * @Version 1.0
 */
@Service
public class MsFseGantryServiceImpl implements MsFseGantryService {

    @DubboReference(interfaceClass = FseGantryService.class, version = "1.0.0")
    private FseGantryService fseGantryService;

    @Override
    public PageData<FseGantryDTO> list(Integer deptId, String keyword, Integer bindFlag, Integer netState, Integer pageNum, Integer pageSize) {
        return fseGantryService.list(deptId, keyword, bindFlag, netState, pageNum, pageSize);
    }

    @Override
    public ListData<FseGantryDTO> list(Integer deptId, String keyword, Integer bindFlag, Integer netState) {
        List<FseGantryDTO> list = fseGantryService.list(deptId, keyword, bindFlag, netState);
        return new ListData<>(list);
    }

    @Override
    public void add(FseGantryAddParam param) {
        fseGantryService.add(param);
    }

    @Override
    public void edit(FseGantryEditParam param) {
        fseGantryService.edit(param);
    }

    @Override
    public void del(Integer gantryId) {
        fseGantryService.del(gantryId);
    }

    @Override
    public void bind(FseGantryBindParam param) {
        fseGantryService.bind(param);
    }

    @Override
    public void unbind(FseGantryUnbindParam param) {
        fseGantryService.unbind(param);
    }

    @Override
    public FseGantryDataDTO monitor(Integer gantryId) {
        return fseGantryService.monitor(gantryId);
    }

    @Override
    public FseGantryDTO details(Integer gantryId) {
        return fseGantryService.details(gantryId);
    }

    @Override
    public ListData<FseGantryDataLogDTO> gantryLog(Integer gantryId, Date time) {
        List<FseGantryDataLogDTO> list = fseGantryService.gantryLog(gantryId, time);
        return new ListData<>(list);
    }
}
